package com.wkq.util.socket

/**
 *
 *@Author: wkq
 *
 *@Time: 2025/5/29 10:47
 *
 *@Desc:  Socket 配置
 */
data class WebSocketConfig(
    val connectTimeout: Int = 5000, // 连接超时(ms)
    var pingTime: Long = 30000, // 心跳间隔(ms)
    var maxReconnectNum: Int = 5, // 最大重连次数
    var reconnectMaxDelay: Long = 10000, // 最大重连延迟(ms)
    var headers: Map<String, String> = emptyMap() // HTTP头
)

//状态
enum class WebSocketState {
    IDLE, CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED, RECONNECTING
}
